package com.fjnu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.fjnu.dao.IRoleDao;
import com.fjnu.entities.Role;
import com.fjnu.service.IRoleService;
@Service
@Transactional(propagation=Propagation.REQUIRED)
public class RoleService implements IRoleService{
	@Autowired
	private IRoleDao roleDao ;
	
	public void addRole(Role role) {
		roleDao.addRole(role);
	}

	@Override
	public void delRole(int id) {
		roleDao.delRole(id);
		
	}

	@Override
	public List<Role> findAllRole() {
		
		return roleDao.findAllRole();
	}

	@Override
	public Role findRoleUnique(int id) {
		
		return roleDao.findRoleUnique(id);
	}

}
